package org.toves.checklua.ast;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class SimpleProcessorResult implements AstProcessorResult {
	private ArrayList<Complaint> complaints;
	private List<Complaint> complaintsView;
	
	public SimpleProcessorResult() {
		complaints = new ArrayList<Complaint>();
		complaintsView = Collections.unmodifiableList(complaints);
	}
	
	public void addComplaint(Complaint value) {
		complaints.add(value);
	}
	
	public List<Complaint> getComplaints() {
		return complaintsView;
	}
	
	public void commit() { }
}
